package org.oncase.smcase.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="bsc_activity")
@SequenceGenerator(name="bsc_activity_seq",sequenceName="bsc_activity_seq")
public class Activity {
	
	@Id
	@GeneratedValue(generator="bsc_activity_seq")
	private Integer id;
	
	@Column(nullable=false)
	private String name;
	
	@Column(nullable=false, length=1024)
	private String description;
	
	@OneToMany
	private List<Person> owners;
	
	@OneToMany
	private List<Expense> expenses;
	
	@Column(nullable=false)
	private String indicators;
	
	@OneToOne
	private Frequency frequency;
	
	private String target;

	public Activity() {
		super();
	}

	public Activity(String name, String description, String indicators) {
		super();
		this.name = name;
		this.description = description;
		this.indicators = indicators;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Person> getOwners() {
		return owners;
	}

	public void setOwners(List<Person> owners) {
		this.owners = owners;
	}

	public List<Expense> getExpenses() {
		return expenses;
	}

	public void setExpenses(List<Expense> expenses) {
		this.expenses = expenses;
	}

	public String getIndicators() {
		return indicators;
	}

	public void setIndicators(String indicators) {
		this.indicators = indicators;
	}

	public Frequency getFrequency() {
		return frequency;
	}

	public void setFrequency(Frequency frequency) {
		this.frequency = frequency;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

}
